﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    xmlns:TheOliver_DigitalSignage_Client_Controls="clr-namespace:TheOliver.DigitalSignage.Client.Controls"
    xmlns:TheOliver_Controls_MemoryControl="clr-namespace:TheOliver.Controls.MemoryControl;assembly=TheOliver.Controls.MemoryControl"
    xmlns:controlsToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
    x:Class="TheOliver.DigitalSignage.Client.MainPage"
    d:DesignHeight="451.5"
    d:DesignWidth="850">
    <UserControl.Resources>
        <ControlTemplate
            x:Key="DefaultButtonStyle"
            TargetType="Button">
            <Grid>
                <VisualStateManager.VisualStateGroups>
                    <VisualStateGroup
                        x:Name="CommonStates">
                        <VisualStateGroup.Transitions>
                            <VisualTransition
                                GeneratedDuration="0:0:0.3" />
                        </VisualStateGroup.Transitions>
                        <VisualState
                            x:Name="Normal">
                            <Storyboard>
                                <ColorAnimationUsingKeyFrames
                                    Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)"
                                    Storyboard.TargetName="rectangle_Copy">
                                    <EasingColorKeyFrame
                                        KeyTime="0"
                                        Value="#00FF0000" />
                                </ColorAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames
                                    Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Offset)"
                                    Storyboard.TargetName="rectangle_Copy">
                                    <EasingDoubleKeyFrame
                                        KeyTime="0"
                                        Value="0.443" />
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames
                                    Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Offset)"
                                    Storyboard.TargetName="rectangle_Copy">
                                    <EasingDoubleKeyFrame
                                        KeyTime="0"
                                        Value="1" />
                                </DoubleAnimationUsingKeyFrames>
                                <PointAnimationUsingKeyFrames
                                    Storyboard.TargetProperty="(Shape.Fill).(RadialGradientBrush.Center)"
                                    Storyboard.TargetName="rectangle_Copy">
                                    <EasingPointKeyFrame
                                        KeyTime="0"
                                        Value="0.499,0.963" />
                                </PointAnimationUsingKeyFrames>
                                <PointAnimationUsingKeyFrames
                                    Storyboard.TargetProperty="(Shape.Fill).(RadialGradientBrush.GradientOrigin)"
                                    Storyboard.TargetName="rectangle_Copy">
                                    <EasingPointKeyFrame
                                        KeyTime="0"
                                        Value="0.499,1.298" />
                                </PointAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames
                                    Storyboard.TargetProperty="(Shape.Fill).(RadialGradientBrush.RadiusY)"
                                    Storyboard.TargetName="rectangle_Copy">
                                    <EasingDoubleKeyFrame
                                        KeyTime="0"
                                        Value="0.898" />
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                        <VisualState
                            x:Name="Pressed">
                            <Storyboard>
                                <ColorAnimationUsingKeyFrames
                                    Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)"
                                    Storyboard.TargetName="rectangle_Copy">
                                    <EasingColorKeyFrame
                                        KeyTime="0"
                                        Value="#FF0C00FF" />
                                </ColorAnimationUsingKeyFrames>
                                <PointAnimationUsingKeyFrames
                                    Storyboard.TargetProperty="(Shape.Fill).(RadialGradientBrush.GradientOrigin)"
                                    Storyboard.TargetName="rectangle_Copy">
                                    <EasingPointKeyFrame
                                        KeyTime="0"
                                        Value="0.507,1.335" />
                                </PointAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames
                                    Storyboard.TargetProperty="(Shape.Fill).(RadialGradientBrush.RadiusX)"
                                    Storyboard.TargetName="rectangle_Copy">
                                    <EasingDoubleKeyFrame
                                        KeyTime="0"
                                        Value="0.822" />
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames
                                    Storyboard.TargetProperty="(Shape.Fill).(RadialGradientBrush.RadiusY)"
                                    Storyboard.TargetName="rectangle_Copy">
                                    <EasingDoubleKeyFrame
                                        KeyTime="0"
                                        Value="0.822" />
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                        <VisualState
                            x:Name="Disabled" />
                        <VisualState
                            x:Name="MouseOver">
                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames
                                    Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Offset)"
                                    Storyboard.TargetName="rectangle_Copy">
                                    <EasingDoubleKeyFrame
                                        KeyTime="0"
                                        Value="0.353" />
                                </DoubleAnimationUsingKeyFrames>
                                <ColorAnimationUsingKeyFrames
                                    Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)"
                                    Storyboard.TargetName="rectangle_Copy">
                                    <EasingColorKeyFrame
                                        KeyTime="0"
                                        Value="Red" />
                                </ColorAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames
                                    Storyboard.TargetProperty="(Shape.Fill).(RadialGradientBrush.RadiusX)"
                                    Storyboard.TargetName="rectangle_Copy">
                                    <EasingDoubleKeyFrame
                                        KeyTime="0"
                                        Value="0.828" />
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames
                                    Storyboard.TargetProperty="(Shape.Fill).(RadialGradientBrush.RadiusY)"
                                    Storyboard.TargetName="rectangle_Copy">
                                    <EasingDoubleKeyFrame
                                        KeyTime="0"
                                        Value="0.828" />
                                </DoubleAnimationUsingKeyFrames>
                                <PointAnimationUsingKeyFrames
                                    Storyboard.TargetProperty="(Shape.Fill).(RadialGradientBrush.Center)"
                                    Storyboard.TargetName="rectangle_Copy">
                                    <EasingPointKeyFrame
                                        KeyTime="0"
                                        Value="0.499,1.014" />
                                </PointAnimationUsingKeyFrames>
                                <PointAnimationUsingKeyFrames
                                    Storyboard.TargetProperty="(Shape.Fill).(RadialGradientBrush.GradientOrigin)"
                                    Storyboard.TargetName="rectangle_Copy">
                                    <EasingPointKeyFrame
                                        KeyTime="0"
                                        Value="0.499,1.349" />
                                </PointAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                    </VisualStateGroup>
                </VisualStateManager.VisualStateGroups>
                <Rectangle
                    x:Name="rectangle"
                    RadiusY="2.839"
                    RadiusX="2.839"
                    Stroke="Black">
                    <Rectangle.Fill>
                        <LinearGradientBrush
                            EndPoint="0.5,1"
                            MappingMode="RelativeToBoundingBox"
                            StartPoint="0.5,0">
                            <GradientStop
                                Color="#FF6E6D6D"
                                Offset="0" />
                            <GradientStop
                                Color="Black"
                                Offset="0.357" />
                        </LinearGradientBrush>
                    </Rectangle.Fill>
                </Rectangle>
                <ContentPresenter
                    Margin="8" />
                <Rectangle
                    x:Name="rectangle_Copy"
                    RadiusY="2.839"
                    RadiusX="2.839"
                    Stroke="Black">
                    <Rectangle.Fill>
                        <RadialGradientBrush
                            Center="0.505,0.871"
                            GradientOrigin="0.505,1.206">
                            <GradientStop
                                Offset="0" />
                            <GradientStop
                                Offset="1" />
                        </RadialGradientBrush>
                    </Rectangle.Fill>
                </Rectangle>
            </Grid>
        </ControlTemplate>
    </UserControl.Resources>

    <controlsToolkit:BusyIndicator x:Name="_isBusy">

        <Grid
            x:Name="LayoutRoot">
            <Grid.Background>
                <RadialGradientBrush
                    GradientOrigin="0.5,1.247"
                    Center="0.5,0.884"
                    RadiusY="0.683"
                    RadiusX="0.683">
                    <GradientStop
                        Color="Black"
                        Offset="1" />
                    <GradientStop
                        Color="Gray" />
                </RadialGradientBrush>
            </Grid.Background>
            <StackPanel
                Margin="227,15,226,0"
                Orientation="Vertical"
                VerticalAlignment="Top">

                <TextBlock
                    x:Name="_applicationName"
                    Foreground="White"
                    FontSize="32"
                    HorizontalAlignment="Center"
                    TextWrapping="Wrap"
                    Text="{Binding Path=GlobalResources.ApplicationName, Source={StaticResource ResourceWrapper}}" />

                <TextBlock
                    x:Name="_applicationVersion"
                    Foreground="White"
                    FontSize="16"
                    HorizontalAlignment="Center"
                    TextWrapping="Wrap"
                    Text="{Binding Path=GlobalResources.Version, Source={StaticResource ResourceWrapper}}" />
            </StackPanel>
            <TheOliver_DigitalSignage_Client_Controls:Rotator
                x:Name="_rotator" />
            <Grid
                x:Name="_menuOverlay"
                Background="#7F000000">
                <StackPanel
                    x:Name="_menu"
                    HorizontalAlignment="Center"
                    Orientation="Horizontal"
                    d:LayoutOverrides="Height"
                    VerticalAlignment="Center">
                    <Button
                        x:Name="_fullscreen"
                        Content="Fullscreen"
                        Click="_fullscreen_Click"
                        Foreground="White"
                        FontSize="24"
                        Margin="4,0"
                        Template="{StaticResource DefaultButtonStyle}" />
                    <Button
                        x:Name="_installOutOfBrowser"
                        Content="{Binding Path=GlobalResources.InstallOutOfBrowser, Source={StaticResource ResourceWrapper}}"
                        Click="_installOutOfBrowser_Click"
                        Foreground="White"
                        FontSize="24"
                        Margin="4,0"
                        Template="{StaticResource DefaultButtonStyle}" />
                    <Button
                        x:Name="_showSettings"
                        Content="Settings"
                        Click="_showSettings_Click"
                        Foreground="White"
                        FontSize="24"
                        Margin="4,0"
                        Template="{StaticResource DefaultButtonStyle}" />
                    <Button
                        x:Name="_setEvent"
                        Content="Set Event/Room"
                        Click="_setEvent_Click"
                        Foreground="White"
                        FontSize="24"
                        Margin="4,0"
                        Template="{StaticResource DefaultButtonStyle}" />
                    <Button
                        x:Name="_increaseMemory"
                        Content="Memory"
                        Foreground="White"
                        FontSize="24"
                        Margin="4,0"
                        Template="{StaticResource DefaultButtonStyle}"
                        Click="_increaseMemory_Click" />
                </StackPanel>

            </Grid>

            <TheOliver_Controls_MemoryControl:MemoryControl
                x:Name="_memoryControl"
                HorizontalAlignment="Center"
                VerticalAlignment="Bottom"
                Foreground="White"
                Margin="0,0,0,7"
                Visibility="Collapsed" />

        </Grid>

    </controlsToolkit:BusyIndicator>
</UserControl>
